<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>robotide.utils.eventhandler</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="robotide-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/robotframework-ride">RIDE</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="robotide-module.html">Package&nbsp;robotide</a> ::
        <a href="robotide.utils-module.html">Package&nbsp;utils</a> ::
        Module&nbsp;eventhandler
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="robotide.utils.eventhandler-module.html">Module robotide.utils.eventhandler</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#  Copyright 2008-2009 Nokia Siemens Networks Oyj</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment">#  Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-comment">#  you may not use this file except in compliance with the License.</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-comment">#  You may obtain a copy of the License at</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-comment">#      http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-comment">#  Unless required by applicable law or agreed to in writing, software</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-comment">#  distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-comment">#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment">#  See the License for the specific language governing permissions and</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-comment">#  limitations under the License.</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">wx</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt>
<a name="eventhandlertype"></a><div id="eventhandlertype-def"><a name="L18"></a><tt class="py-lineno">18</tt> <a class="py-toggle" href="#" id="eventhandlertype-toggle" onclick="return toggle('eventhandlertype');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="robotide.utils.eventhandler.eventhandlertype-class.html">eventhandlertype</a><tt class="py-op">(</tt><tt class="py-base-class">type</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="eventhandlertype-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="eventhandlertype-expanded"><a name="eventhandlertype.__new__"></a><div id="eventhandlertype.__new__-def"><a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="eventhandlertype.__new__-toggle" onclick="return toggle('eventhandlertype.__new__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.utils.eventhandler.eventhandlertype-class.html#__new__">__new__</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">bases</tt><tt class="py-op">,</tt> <tt class="py-param">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="eventhandlertype.__new__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="eventhandlertype.__new__-expanded"><a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">mod_time_wrapper</tt><tt class="py-op">(</tt><tt class="py-param">method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">            <tt class="py-keyword">def</tt> <tt class="py-def-name">wrapped</tt><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">event</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_can_be_edited</tt><tt class="py-op">(</tt><tt class="py-name">event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">                    <tt class="py-name">method</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">event</tt><tt class="py-op">)</tt> </tt>
</div><a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">wrapped</tt> </tt>
</div><a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">attr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">dict</tt><tt class="py-op">:</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'On'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">                    <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt id="link-0" class="py-name" targets="Variable robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode.name=robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode-class.html#name,Variable robotide.contrib.testrunner.runprofiles.CustomScriptProfile.name=robotide.contrib.testrunner.runprofiles.CustomScriptProfile-class.html#name,Variable robotide.contrib.testrunner.runprofiles.PybotProfile.name=robotide.contrib.testrunner.runprofiles.PybotProfile-class.html#name,Variable robotide.controller.settingcontrollers.ImportController.name=robotide.controller.settingcontrollers.ImportController-class.html#name,Variable robotide.controller.settingcontrollers.MetadataController.name=robotide.controller.settingcontrollers.MetadataController-class.html#name,Variable robotide.controller.settingcontrollers.VariableController.name=robotide.controller.settingcontrollers.VariableController-class.html#name,Variable robotide.controller.stepcontrollers.ForLoopStepController.name=robotide.controller.stepcontrollers.ForLoopStepController-class.html#name,Variable robotide.controller.tags.Tag.name=robotide.controller.tags.Tag-class.html#name,Variable robotide.editor.editors.EditorPanel.name=robotide.editor.editors.EditorPanel-class.html#name,Variable robotide.publish.messages.name=robotide.publish.messages-module.html#name"><a title="robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode.name
robotide.contrib.testrunner.runprofiles.CustomScriptProfile.name
robotide.contrib.testrunner.runprofiles.PybotProfile.name
robotide.controller.settingcontrollers.ImportController.name
robotide.controller.settingcontrollers.MetadataController.name
robotide.controller.settingcontrollers.VariableController.name
robotide.controller.stepcontrollers.ForLoopStepController.name
robotide.controller.tags.Tag.name
robotide.editor.editors.EditorPanel.name
robotide.publish.messages.name" class="py-name" href="#" onclick="return doclink('link-0', 'name', 'link-0');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'RideFrame'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">attr</tt> <tt class="py-op">==</tt> <tt class="py-string">'OnClose'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">                    <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt id="link-1" class="py-name"><a title="robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode.name
robotide.contrib.testrunner.runprofiles.CustomScriptProfile.name
robotide.contrib.testrunner.runprofiles.PybotProfile.name
robotide.controller.settingcontrollers.ImportController.name
robotide.controller.settingcontrollers.MetadataController.name
robotide.controller.settingcontrollers.VariableController.name
robotide.controller.stepcontrollers.ForLoopStepController.name
robotide.controller.tags.Tag.name
robotide.editor.editors.EditorPanel.name
robotide.publish.messages.name" class="py-name" href="#" onclick="return doclink('link-1', 'name', 'link-0');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'Tree'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">attr</tt> <tt class="py-op">==</tt> <tt class="py-string">'OnDrop'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> \ </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">                    <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt id="link-2" class="py-name"><a title="robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode.name
robotide.contrib.testrunner.runprofiles.CustomScriptProfile.name
robotide.contrib.testrunner.runprofiles.PybotProfile.name
robotide.controller.settingcontrollers.ImportController.name
robotide.controller.settingcontrollers.MetadataController.name
robotide.controller.settingcontrollers.VariableController.name
robotide.controller.stepcontrollers.ForLoopStepController.name
robotide.controller.tags.Tag.name
robotide.editor.editors.EditorPanel.name
robotide.publish.messages.name" class="py-name" href="#" onclick="return doclink('link-2', 'name', 'link-0');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'KeywordEditor'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">attr</tt> <tt class="py-op">==</tt> <tt class="py-string">'OnIdle'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">[</tt><tt class="py-name">attr</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">mod_time_wrapper</tt><tt class="py-op">(</tt><tt class="py-name">dict</tt><tt class="py-op">[</tt><tt class="py-name">attr</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Static Method robotide.publish.messagetype.messagetype.__new__()=robotide.publish.messagetype.messagetype-class.html#__new__,Static Method robotide.utils.eventhandler.eventhandlertype.__new__()=robotide.utils.eventhandler.eventhandlertype-class.html#__new__"><a title="robotide.publish.messagetype.messagetype.__new__
robotide.utils.eventhandler.eventhandlertype.__new__" class="py-name" href="#" onclick="return doclink('link-3', '__new__', 'link-3');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt> <tt id="link-4" class="py-name"><a title="robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode.name
robotide.contrib.testrunner.runprofiles.CustomScriptProfile.name
robotide.contrib.testrunner.runprofiles.PybotProfile.name
robotide.controller.settingcontrollers.ImportController.name
robotide.controller.settingcontrollers.MetadataController.name
robotide.controller.settingcontrollers.VariableController.name
robotide.controller.stepcontrollers.ForLoopStepController.name
robotide.controller.tags.Tag.name
robotide.editor.editors.EditorPanel.name
robotide.publish.messages.name" class="py-name" href="#" onclick="return doclink('link-4', 'name', 'link-0');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">bases</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"> </tt>
<a name="RideEventHandler"></a><div id="RideEventHandler-def"><a name="L34"></a><tt class="py-lineno">34</tt> <a class="py-toggle" href="#" id="RideEventHandler-toggle" onclick="return toggle('RideEventHandler');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="robotide.utils.eventhandler.RideEventHandler-class.html">RideEventHandler</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RideEventHandler-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="RideEventHandler-expanded"><a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">    <tt class="py-name">__metaclass__</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name" targets="Class robotide.utils.eventhandler.eventhandlertype=robotide.utils.eventhandler.eventhandlertype-class.html"><a title="robotide.utils.eventhandler.eventhandlertype" class="py-name" href="#" onclick="return doclink('link-5', 'eventhandlertype', 'link-5');">eventhandlertype</a></tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"> </tt>
<a name="RideEventHandler._can_be_edited"></a><div id="RideEventHandler._can_be_edited-def"><a name="L37"></a><tt class="py-lineno">37</tt> <a class="py-toggle" href="#" id="RideEventHandler._can_be_edited-toggle" onclick="return toggle('RideEventHandler._can_be_edited');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.utils.eventhandler.RideEventHandler-class.html#_can_be_edited">_can_be_edited</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RideEventHandler._can_be_edited-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RideEventHandler._can_be_edited-expanded"><a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">        <tt class="py-name">ctrl</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method robotide.editor.editors.SettingEditor.get_selected_datafile_controller()=robotide.editor.editors.SettingEditor-class.html#get_selected_datafile_controller,Method robotide.editor.kweditor.KeywordEditor.get_selected_datafile_controller()=robotide.editor.kweditor.KeywordEditor-class.html#get_selected_datafile_controller,Method robotide.ui.mainframe.RideFrame.get_selected_datafile_controller()=robotide.ui.mainframe.RideFrame-class.html#get_selected_datafile_controller,Method robotide.ui.tree.Tree.get_selected_datafile_controller()=robotide.ui.tree.Tree-class.html#get_selected_datafile_controller,Method robotide.utils.eventhandler.RideEventHandler.get_selected_datafile_controller()=robotide.utils.eventhandler.RideEventHandler-class.html#get_selected_datafile_controller"><a title="robotide.editor.editors.SettingEditor.get_selected_datafile_controller
robotide.editor.kweditor.KeywordEditor.get_selected_datafile_controller
robotide.ui.mainframe.RideFrame.get_selected_datafile_controller
robotide.ui.tree.Tree.get_selected_datafile_controller
robotide.utils.eventhandler.RideEventHandler.get_selected_datafile_controller" class="py-name" href="#" onclick="return doclink('link-6', 'get_selected_datafile_controller', 'link-6');">get_selected_datafile_controller</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ctrl</tt> <tt class="py-keyword">and</tt> <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt class="py-name">has_been_removed_from_disk</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_show_removed_from_disk_warning</tt><tt class="py-op">(</tt><tt class="py-name">ctrl</tt><tt class="py-op">,</tt> <tt class="py-name">event</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ctrl</tt> <tt class="py-keyword">and</tt> <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method robotide.ui.tree.TestDataHandler.has_been_modified_on_disk()=robotide.ui.tree.TestDataHandler-class.html#has_been_modified_on_disk"><a title="robotide.ui.tree.TestDataHandler.has_been_modified_on_disk" class="py-name" href="#" onclick="return doclink('link-7', 'has_been_modified_on_disk', 'link-7');">has_been_modified_on_disk</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_show_modified_on_disk_warning</tt><tt class="py-op">(</tt><tt class="py-name">ctrl</tt><tt class="py-op">,</tt> <tt class="py-name">event</tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line"> </tt>
<a name="RideEventHandler._show_removed_from_disk_warning"></a><div id="RideEventHandler._show_removed_from_disk_warning-def"><a name="L45"></a><tt class="py-lineno">45</tt> <a class="py-toggle" href="#" id="RideEventHandler._show_removed_from_disk_warning-toggle" onclick="return toggle('RideEventHandler._show_removed_from_disk_warning');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.utils.eventhandler.RideEventHandler-class.html#_show_removed_from_disk_warning">_show_removed_from_disk_warning</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctrl</tt><tt class="py-op">,</tt> <tt class="py-param">event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RideEventHandler._show_removed_from_disk_warning-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RideEventHandler._show_removed_from_disk_warning-expanded"><a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">        <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'The file has been removed from the file system.'</tt><tt class="py-op">,</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">               <tt class="py-string">'Do you want to remove it from the project?'</tt><tt class="py-op">,</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">               <tt class="py-string">'Answering &lt;No&gt; will rewrite the file on disk.'</tt><tt class="py-op">]</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_show_warning</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-name">ctrl</tt><tt class="py-op">,</tt> <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method robotide.controller.filecontrollers.ResourceFileController.remove()=robotide.controller.filecontrollers.ResourceFileController-class.html#remove,Method robotide.controller.filecontrollers.TestCaseFileController.remove()=robotide.controller.filecontrollers.TestCaseFileController-class.html#remove,Method robotide.controller.filecontrollers.TestDataDirectoryController.remove()=robotide.controller.filecontrollers.TestDataDirectoryController-class.html#remove,Method robotide.controller.stepcontrollers.ForLoopStepController.remove()=robotide.controller.stepcontrollers.ForLoopStepController-class.html#remove,Method robotide.controller.stepcontrollers.IntendedStepController.remove()=robotide.controller.stepcontrollers.IntendedStepController-class.html#remove,Method robotide.controller.stepcontrollers.StepController.remove()=robotide.controller.stepcontrollers.StepController-class.html#remove,Method robotide.ui.actiontriggers.ActionDelegator.remove()=robotide.ui.actiontriggers.ActionDelegator-class.html#remove,Method robotide.ui.tree.VariableHandler.remove()=robotide.ui.tree.VariableHandler-class.html#remove"><a title="robotide.controller.filecontrollers.ResourceFileController.remove
robotide.controller.filecontrollers.TestCaseFileController.remove
robotide.controller.filecontrollers.TestDataDirectoryController.remove
robotide.controller.stepcontrollers.ForLoopStepController.remove
robotide.controller.stepcontrollers.IntendedStepController.remove
robotide.controller.stepcontrollers.StepController.remove
robotide.ui.actiontriggers.ActionDelegator.remove
robotide.ui.tree.VariableHandler.remove" class="py-name" href="#" onclick="return doclink('link-8', 'remove', 'link-8');">remove</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line"> </tt>
<a name="RideEventHandler._show_modified_on_disk_warning"></a><div id="RideEventHandler._show_modified_on_disk_warning-def"><a name="L51"></a><tt class="py-lineno">51</tt> <a class="py-toggle" href="#" id="RideEventHandler._show_modified_on_disk_warning-toggle" onclick="return toggle('RideEventHandler._show_modified_on_disk_warning');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.utils.eventhandler.RideEventHandler-class.html#_show_modified_on_disk_warning">_show_modified_on_disk_warning</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">ctrl</tt><tt class="py-op">,</tt> <tt class="py-param">event</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RideEventHandler._show_modified_on_disk_warning-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RideEventHandler._show_modified_on_disk_warning-expanded"><a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">reload_datafile</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">            <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method robotide.context.configobj.ConfigObj.reload()=robotide.context.configobj.ConfigObj-class.html#reload,Method robotide.controller.filecontrollers.ResourceFileController.reload()=robotide.controller.filecontrollers.ResourceFileController-class.html#reload,Method robotide.controller.filecontrollers.TestCaseFileController.reload()=robotide.controller.filecontrollers.TestCaseFileController-class.html#reload,Method robotide.controller.filecontrollers.TestDataDirectoryController.reload()=robotide.controller.filecontrollers.TestDataDirectoryController-class.html#reload"><a title="robotide.context.configobj.ConfigObj.reload
robotide.controller.filecontrollers.ResourceFileController.reload
robotide.controller.filecontrollers.TestCaseFileController.reload
robotide.controller.filecontrollers.TestDataDirectoryController.reload" class="py-name" href="#" onclick="return doclink('link-9', 'reload', 'link-9');">reload</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method robotide.editor.editors.SettingEditor.refresh_datafile()=robotide.editor.editors.SettingEditor-class.html#refresh_datafile,Method robotide.editor.kweditor.KeywordEditor.refresh_datafile()=robotide.editor.kweditor.KeywordEditor-class.html#refresh_datafile,Method robotide.ui.mainframe.RideFrame.refresh_datafile()=robotide.ui.mainframe.RideFrame-class.html#refresh_datafile,Method robotide.ui.tree.Tree.refresh_datafile()=robotide.ui.tree.Tree-class.html#refresh_datafile"><a title="robotide.editor.editors.SettingEditor.refresh_datafile
robotide.editor.kweditor.KeywordEditor.refresh_datafile
robotide.ui.mainframe.RideFrame.refresh_datafile
robotide.ui.tree.Tree.refresh_datafile" class="py-name" href="#" onclick="return doclink('link-10', 'refresh_datafile', 'link-10');">refresh_datafile</a></tt><tt class="py-op">(</tt><tt class="py-name">ctrl</tt><tt class="py-op">,</tt> <tt class="py-name">event</tt><tt class="py-op">)</tt> </tt>
</div><a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line">        <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'The file has been changed on the file system.'</tt><tt class="py-op">,</tt> </tt>
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">               <tt class="py-string">'Do you want to reload the file?'</tt><tt class="py-op">,</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">               <tt class="py-string">'Answering &lt;No&gt; will overwrite the changes on disk.'</tt><tt class="py-op">]</tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_show_warning</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-name">ctrl</tt><tt class="py-op">,</tt> <tt class="py-name">reload_datafile</tt><tt class="py-op">)</tt> </tt>
</div><a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"> </tt>
<a name="RideEventHandler._show_warning"></a><div id="RideEventHandler._show_warning-def"><a name="L60"></a><tt class="py-lineno">60</tt> <a class="py-toggle" href="#" id="RideEventHandler._show_warning-toggle" onclick="return toggle('RideEventHandler._show_warning');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.utils.eventhandler.RideEventHandler-class.html#_show_warning">_show_warning</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg_lines</tt><tt class="py-op">,</tt> <tt class="py-param">ctrl</tt><tt class="py-op">,</tt> <tt class="py-param">yes_handler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RideEventHandler._show_warning-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RideEventHandler._show_warning-expanded"><a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Variable robotide.controller.basecontroller.ControllerWithParent.dirty=robotide.controller.basecontroller.ControllerWithParent-class.html#dirty,Variable robotide.controller.settingcontrollers.ImportController.dirty=robotide.controller.settingcontrollers.ImportController-class.html#dirty,Variable robotide.editor.kweditor.KeywordEditor.dirty=robotide.editor.kweditor.KeywordEditor-class.html#dirty"><a title="robotide.controller.basecontroller.ControllerWithParent.dirty
robotide.controller.settingcontrollers.ImportController.dirty
robotide.editor.kweditor.KeywordEditor.dirty" class="py-name" href="#" onclick="return doclink('link-11', 'dirty', 'link-11');">dirty</a></tt><tt class="py-op">:</tt> </tt>
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">            <tt class="py-name">msg_lines</tt><tt class="py-op">.</tt><tt class="py-name">insert</tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-string">'Answering &lt;Yes&gt; will discard unsaved changes.'</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">        <tt class="py-name">msg_lines</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-string">'Changed file is:'</tt><tt class="py-op">,</tt> <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Variable robotide.controller.basecontroller.ControllerWithParent.datafile=robotide.controller.basecontroller.ControllerWithParent-class.html#datafile,Variable robotide.controller.commands.Occurrence.datafile=robotide.controller.commands.Occurrence-class.html#datafile,Variable robotide.controller.stepcontrollers.StepController.datafile=robotide.controller.stepcontrollers.StepController-class.html#datafile,Variable robotide.pluginapi.plugin.Plugin.datafile=robotide.pluginapi.plugin.Plugin-class.html#datafile,Variable robotide.ui.preview.PreviewPlugin.datafile=robotide.ui.preview.PreviewPlugin-class.html#datafile"><a title="robotide.controller.basecontroller.ControllerWithParent.datafile
robotide.controller.commands.Occurrence.datafile
robotide.controller.stepcontrollers.StepController.datafile
robotide.pluginapi.plugin.Plugin.datafile
robotide.ui.preview.PreviewPlugin.datafile" class="py-name" href="#" onclick="return doclink('link-12', 'datafile', 'link-12');">datafile</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Variable robotide.controller.cellinfo.CellInfo.source=robotide.controller.cellinfo.CellInfo-class.html#source,Variable robotide.controller.commands.Occurrence.source=robotide.controller.commands.Occurrence-class.html#source,Variable robotide.controller.filecontrollers.TestDataDirectoryController.source=robotide.controller.filecontrollers.TestDataDirectoryController-class.html#source,Variable robotide.controller.settingcontrollers.TagsController.source=robotide.controller.settingcontrollers.TagsController-class.html#source"><a title="robotide.controller.cellinfo.CellInfo.source
robotide.controller.commands.Occurrence.source
robotide.controller.filecontrollers.TestDataDirectoryController.source
robotide.controller.settingcontrollers.TagsController.source" class="py-name" href="#" onclick="return doclink('link-13', 'source', 'link-13');">source</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-name">wx</tt><tt class="py-op">.</tt><tt class="py-name">MessageBox</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">msg_lines</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'File Changed On Disk'</tt><tt class="py-op">,</tt> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">                            <tt id="link-14" class="py-name" targets="Variable robotide.contrib.testrunner.TestSuiteTreeCtrl.TestSuiteTreeCtrl.style=robotide.contrib.testrunner.TestSuiteTreeCtrl.TestSuiteTreeCtrl-class.html#style"><a title="robotide.contrib.testrunner.TestSuiteTreeCtrl.TestSuiteTreeCtrl.style" class="py-name" href="#" onclick="return doclink('link-14', 'style', 'link-14');">style</a></tt><tt class="py-op">=</tt><tt class="py-name">wx</tt><tt class="py-op">.</tt><tt class="py-name">YES_NO</tt><tt class="py-op">|</tt><tt class="py-name">wx</tt><tt class="py-op">.</tt><tt class="py-name">CANCEL</tt><tt class="py-op">|</tt><tt class="py-name">wx</tt><tt class="py-op">.</tt><tt class="py-name">ICON_WARNING</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ret</tt> <tt class="py-op">==</tt> <tt class="py-name">wx</tt><tt class="py-op">.</tt><tt class="py-name">NO</tt><tt class="py-op">:</tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">            <tt class="py-name">ctrl</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method robotide.context.settings.Settings.save()=robotide.context.settings.Settings-class.html#save,Method robotide.controller.chiefcontroller.ChiefController.save()=robotide.controller.chiefcontroller.ChiefController-class.html#save,Method robotide.editor.editors.TestCaseEditor.save()=robotide.editor.editors.TestCaseEditor-class.html#save,Method robotide.editor.kweditor.KeywordEditor.save()=robotide.editor.kweditor.KeywordEditor-class.html#save,Method robotide.ui.mainframe.RideFrame.save()=robotide.ui.mainframe.RideFrame-class.html#save"><a title="robotide.context.settings.Settings.save
robotide.controller.chiefcontroller.ChiefController.save
robotide.editor.editors.TestCaseEditor.save
robotide.editor.kweditor.KeywordEditor.save
robotide.ui.mainframe.RideFrame.save" class="py-name" href="#" onclick="return doclink('link-15', 'save', 'link-15');">save</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">ret</tt> <tt class="py-op">==</tt> <tt class="py-name">wx</tt><tt class="py-op">.</tt><tt class="py-name">YES</tt><tt class="py-op">:</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">            <tt class="py-name">yes_handler</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line"> </tt>
<a name="RideEventHandler.get_selected_datafile_controller"></a><div id="RideEventHandler.get_selected_datafile_controller-def"><a name="L73"></a><tt class="py-lineno">73</tt> <a class="py-toggle" href="#" id="RideEventHandler.get_selected_datafile_controller-toggle" onclick="return toggle('RideEventHandler.get_selected_datafile_controller');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.utils.eventhandler.RideEventHandler-class.html#get_selected_datafile_controller">get_selected_datafile_controller</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="RideEventHandler.get_selected_datafile_controller-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RideEventHandler.get_selected_datafile_controller-expanded"><a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="robotide-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/robotframework-ride">RIDE</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Apr 13 15:09:47 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
